package com.ibeeking.found.id.service.common.dos;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @ClassName SerialNoRuleDTO
 * @Description
 * @Author ibeeking
 * @Date 2021-11-15 14:45
 **/
@Data
@TableName("sys_serial_number_rule")
public class SerialNoRuleDO implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 商户Id，租户端shopId=0
     */
    @TableField(value = "shop_id")
    private Long shopId;
    /**
     * 场景键,区分用于不同场景
     */
    @TableField(value = "key_code")
    private String keyCode;
    /**
     * 顺序号
     */
    @TableField(value = "order_no")
    private Integer orderNo;
    /**
     * 数据类型,利用java.sql.Types：字符型=12、日期型=91、数字型=2
     */
    @TableField(value = "data_type")
    private Integer dataType;
    /**
     * 规则,如果dataType=12 formula=保存固定字；dataType=91 formula = 日期格式； dataType=2 formula = 位数
     */
    @TableField(value = "formula")
    private String formula;
    /**
     * 初始值
     */
    @TableField(value = "initial_data")
    private String initialData;


    @TableField(value = "create_time")
    private LocalDateTime createTime;

    @TableField(value = "create_by")
    private Long createBy;

    @TableField(value = "modify_time")
    private LocalDateTime modifyTime;

    @TableField(value = "modify_by")
    private Long modifyBy;

}
